<template>
  <div class="label-item">
    <img :src="info.icon" alt="" class="label-item__left" />
    <div class="label-item__right">
      <div class="name-box">
        <span class="name">{{ info.originName || info.name }}</span>
        <img src="@/assets/image/arrow_right@2x.png" alt="" />
      </div>
      <div>
        <span class="unit">{{ info.unit }}</span>
      </div>
    </div>
  </div>
</template>

<script setup>
defineProps({
  info: {
    type: Object,
    default: () => {},
  },
});
</script>

<style lang="scss" scoped>
.label-item {
  display: flex;
  padding: 6px 0px 6px 0px;
  box-sizing: border-box;
  position: relative;
  &[line]::after {
    position: absolute;
    content: "";
    left: 0px;
    bottom: 0px;
    height: 2px;
    width: 100%;
    opacity: 0.75;
    background-image: linear-gradient(to right, #cbd8f2, transparent);
  }
  &__left {
    width: 48px;
    height: 48px;
    display: block;
  }
  &__right {
    margin-left: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #e5f2ff;
    .name-box {
      cursor: pointer;
      display: flex;
      align-items: center;
      .name {
        font-size: 16px;
        font-weight: 600;
      }
      img {
        width: 16px;
        height: 16px;
        display: inline-block;
        margin-left: 6px;
      }
    }

    .value {
      font-family: Akrobat-Bold;
      font-weight: 600;
      font-size: 20px;
    }
    .unit {
      font-weight: 400;
      font-size: 14px;
      margin-left: 10px;
    }
  }
}
</style>
